package cn.chrilwe.pigpig.core.model.user;

import cn.chrilwe.autocreatetable.start.annotation.Entity;
import cn.chrilwe.autocreatetable.start.annotation.mysql.AutoIncrement;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Column;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Notnull;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Primary;
import cn.chrilwe.autocreatetable.start.annotation.mysql.Table;
import cn.chrilwe.autocreatetable.start.common.Engine;
import cn.chrilwe.autocreatetable.start.common.MysqlColumnType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 
 * @author chrilwe
 * 2020-7-30
 */
@Data
@Entity
@Table(charset = "utf8", engine = Engine.INNODB, name = "tb_auth")
@ApiModel
public class Authority {
	
	@ApiModelProperty(name = "id", value = "权限id")
	@Column(length = 8, name = "auth_id", type = MysqlColumnType.INT)
	@Primary
	@Notnull
	@AutoIncrement
	private int authId;
	
	@Column(length = 11, name = "auth_name", type = MysqlColumnType.VARCHAR)
	@Notnull
	@ApiModelProperty(name = "name", value = "权限名称")
	private String name;
	
	@Column(length = 150, name = "auth_url", type = MysqlColumnType.VARCHAR)
	@Notnull
	@ApiModelProperty(name = "url", value = "权限地址")
	private String url;
	
	@Column(length = 1, name = "is_default", type = MysqlColumnType.INT)
	@Notnull
	@ApiModelProperty(name = "isDefault", value = "初始默认就有权限")
	private int isDefault;//0.不是默认  1.默认
}
